<div class="col-md-10">
    <h2>角色列表</h2>
    <hr>
    <form class="form-inline" id="queryForm" role="form">
        <input type="text" name="roleName" class="form-control" id="queryRoleName" placeholder="请输入名称">
        <button type="button" onclick="queryRole(this)" class="btn btn-primary">查询</button>
    </form>
    <hr>
    <table class="table table-hover table-bordered" id="role_grade">
        <thead>
        <tr>
            <th>ID</th>
            <th>角色名称</th>
            <th>描述</th>
            <th>是否可用</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <div id="allotPermission_table">
                <#list listResult.list as sysRole>
                    <tr id="tr_${sysRole.id}">
                        <td id="id_${sysRole.id}">${sysRole.id?default("未设置")}</td>
                        <td id="roleName_${sysRole.id}">${sysRole.roleName?default("未设置")}</td>
                        <td id="description_${sysRole.id}">${sysRole.description?default("未设置")}</td>
                        <td id="isAviliable_${sysRole.id}">${(sysRole.isAvailable==1)?string('是','否')}</td>
                        <td>
                            <button id="update_${sysRole.id}" type="button" onclick="skipAddRoles(this)" class="btn btn-default">分配权限</button>
                        <#--<button id="delete" type="delete" onclick="deleteRecord(this)" class="btn btn-danger">删除角色</button>-->
                        </td>
                    </tr>
                </div>
                </#list>
        </tbody>
    </table>
    <nav aria-label="Page navigation" style="text-align: right">
        <div id="allotPermission_table_page">
            <ul class="pagination" id="table_pagging">
                    <#assign pageNum=listResult.totalPageNo>
                    <#if pageNum==0>
                        <#assign pageNum=1>
                    </#if>
                    <#list 1..pageNum as pn>
                        <li id="a_${pn}" class="${(pn==listResult.nowPageNo)?string('disabled','')}"><a onclick="${(pn==listResult.nowPageNo)?string('','listRecord(this)')}" href="#" >${pn}</a></li>
                    </#list>
            </ul>
        </div>
    </nav>
</div>